using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace Rapier.Kodachi.Shared
{
    public class NotificationPackage
    {
        #region Events
        public event PackageCaptionClickHandler CaptionClick;
        public event PackageMessageClickHandler MessageClick;
        #endregion

        #region Properties
        public bool IsCaptionClickable
        {
            get { return CaptionClick != null; }
        }

        public bool IsMessageClickable
        {
            get { return MessageClick != null; }
        }

        private string _Message;
        public string Message
        {
            get { return _Message; }
            set { _Message = value; }
        }

        private string _Caption;
        public string Caption
        {
            get { return _Caption; }
            set { _Caption = value; }
        }

        private Bitmap _Image = System.Drawing.SystemIcons.Information.ToBitmap();
        public Bitmap Image
        {
            get { return _Image; }
            set { _Image = value; }
        }
        #endregion

        #region Public Methods
        public void OnCaptionClick()
        {
            if (CaptionClick != null)
                CaptionClick(this);
        }

        public void OnMessageClick()
        {
            if (MessageClick != null)
                MessageClick(this);
        } 
        #endregion
    }

    public delegate void PackageCaptionClickHandler(NotificationPackage sender);
    public delegate void PackageMessageClickHandler(NotificationPackage sender);
}
